﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChoJuRating.View
{
    public static class CJMsgBox
    {

        public static bool ShowDialog(string msg, MsgTitle title = MsgTitle.Tip,  bool viewCancel = false, bool isBack = false)
        {
            var box = new CJMessageBox(msg, title, viewCancel, isBack);
            box.ShowDialog();
            return box.Result;
        }

        public static bool Show(string msg, MsgTitle title = MsgTitle.Tip, bool viewCancel = false, bool isBack = false)
        {
            var box = new CJMessageBox(msg, title, viewCancel, isBack);
            box.Show();
            return box.Result;
        }
    }

    public enum MsgTitle
    {
        /// <summary>
        /// 提示
        /// </summary>
        Tip = 1,

        /// <summary>
        /// 警告
        /// </summary>
        Warning = 2,

        /// <summary>
        /// 错误/异常
        /// </summary>
        Error = 3,
    }
}
